<?php

	require_once( '../system/smarty.inc' );
	require_once( '../system/Class_ERROR.php' );
	require_once( '../system/login.inc.php' );
	require_once( '../system/aoki_m.php' );
	require_once( '../system/Class_PWD.php' );
	require_once( '../system/mdao/Class_M_OTHER.php' );
	
	Class_PWD::valid_auth(AOKI_AUTH_AREA_AD, $login['staff_auth']);
	
	$isG7  = FALSE;
	if   ($login['staff_auth'] == 'G-7') {
		$isG7 = TRUE;
	}
	$smarty->assign('isG7', $isG7 );
	
	if( isset( $err_mes ) ) $smarty->assign('err', $err_mes);
	
	$smarty->assign('auth', $arr_auth );
	
	$smarty->assign('menu', $smarty->fetch('menu.html') );
	$smarty->assign('logout', $smarty->fetch('logout.html') );
	$smarty->assign('footer', $smarty->fetch('footer.html') );
	$forms = array();
	$forms["year4"] = isset($_GET["year4"]) ? $_GET["year4"]:date('Y');
	if (empty($forms["year4"])) {
		$forms["year4"] = date('Y');
	}
	$smarty->assign('year4',  Class_PWD::get_years());
	
	$week= Class_M_OTHER::get_week_array( $forms["year4"], PLEASE_SELECT_ARR, TRUE );
	$smarty->assign('week', $week );
	$smarty->assign('forms', $forms);
	$notisg5 = TRUE ;
	if   ($login['staff_auth'] == 'G-5') {
		$notisg5 = FALSE ;
	}
	$smarty->assign('notisg5', $notisg5 );
	if (isset($_GET["pro"]) && $_GET["pro"] == "sucess") {
		$smarty->display('mmapshop_import_end.html');
	} else {
		$smarty->assign('import', $smarty->fetch('import.html') );
		$smarty->display('mmapshop_import.html');		
	}
	

?>